package com.studycloud.tjshareuniversity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.tojoy.shop.TJShopEngine;
import com.tojoy.shop.activity.MpDownloadActivity;

public class FunctionListActivity extends AppCompatActivity {

    public static void launch(Context context) {
        Intent intent = new Intent(context, FunctionListActivity.class);
        context.startActivity(intent);
    }

    private Context context;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = this;
        setContentView(R.layout.activity_function_list);
        findViewById(R.id.item_1_view).setOnClickListener(v -> {
//            TJShopEngine.skipCarrier(context,"");
        });

        findViewById(R.id.item_2_view).setOnClickListener(v -> {
            //模拟直播间
            ItemActivity.launch(context, 1);
        });

        findViewById(R.id.item_3_view).setOnClickListener(v -> {
            //模拟支付
            ItemActivity.launch(context, 2);
        });

        findViewById(R.id.item_4_view).setOnClickListener(v -> {
            //更新小程序
            Toast.makeText(context, "正在更新小程序", Toast.LENGTH_LONG).show();
            MpDownloadActivity.launch(context, "");
        });

        findViewById(R.id.item_5_view).setOnClickListener(v -> {
            //更换账号
            finish();
        });

    }
}